package com.copa.gameStore.client;

import com.copa.gameStore.dto.ValidateCartDto;
import com.copa.gameStore.vo.CartVo;
import com.copa.gameStore.vo.ResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("game-cart")
public interface CartClient {

    @PostMapping("validateUser")
    void validateUser(@RequestBody ValidateCartDto validateCartDto);

    @PostMapping("deleteByOrder")
    void deleteByOrder(@RequestBody ValidateCartDto validateCartDto);

    @GetMapping("getByUserId")
    ResponseVo<CartVo> getByUserId(@RequestParam("userId") Long userId);
}
